    /*
    *  TODO
     *  请在此处编写javascript代码
     */
//如果是否为课题选择为否  field9668

//支出项目 ：input：field10292  span：field10292span 

//span内容：<span class="e8_showNameClass"><a title="0313">设备费</a>&nbsp;<span class="e8_delClass" id="0313" onclick="del(event,this,2,false,{});" style="opacity: 0; visibility: hidden;">&nbsp;x&nbsp;</span></span>


//监听内容变化
jQuery(function(){
   //监听选择框选变化 
    jQuery("#field9668").change(function(){
        var zjly = jQuery("#field9668").val();
        //判断是否选中否
        if (zjly == '1') {
            //自动选中
            jQuery("#field10292").val("0303");
            jQuery("#field10292span").html('<span class="e8_showNameClass e8_showNameHoverClass"><a title="0313">试剂费</a>&nbsp;<span class="e8_delClass" id="0313" onclick="del(event,this,2,false,{});" style="opacity: 1; visibility: hidden;">&nbsp;x&nbsp;</span></span>');
            jQuery("field10292spanimg#").html("");
        }else{
            //删除原有
            jQuery("#field10292").val("");
            jQuery("#field10292span").html('');
            jQuery("field10292spanimg#").html("");
        }
});


var title = $("field10292span");
var title = $('#field10292span');//the element I want to monitor
title.bind('DOMNodeInserted', function(e) {
    alert('element now contains: ' + $(e.target).html());
});


/*
    //监听输入框变化，如果删除，就清空浏览框的value
    jQuery("#field10292").change(function(){
        alert(jQuery("#field10292").val())
        var thisval = jQuery("#field10292").val();
        if(thisval == ''){
            alert("test  so....exit!")
        }
       //删除原有
        jQuery("#field10292").val("");
        jQuery("#field10292span").html('');
        jQuery("field10292spanimg#").html("");
    });
    */
})

